const db = require("../../config/db");

module.exports = {
    getNewsDetail({ id }) {
        return new Promise((resolve, reject) => {
            let get_detail_sql = `select * from db_news where id="${id}"`;
            db.query(get_detail_sql, (err, rows) => {
                if (err) {
                    reject(err);
                } else {
                    resolve(rows);
                }
            });
        });
    },
};
